#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;

class Solution {
public:
    bool isNumber(string s) {
        if(s.empty()){
            return false;
        }
        if(s.size()==1&&s[0]>='0'&&s[0]<='9'){
            return true;
        }
        string temp(s.begin()+1,s.end());
        char c = *s.begin();
        bool nextis = isNumber(temp);
        if(nextis){
            if((c!='E'&&c!='e')&&(temp[0]=='-'||temp[0]=='+')){
                return false;
            }
            
        }
        else{
            return false;
        }
    }

};
